<template>
  <div class="parent-page">
    <div>父组件房子：{{ house }}</div>
    <br />
    <Child />
  </div>
</template>
<script setup lang="ts" name="privderAndInjectParent">
import Child from './child.vue';
import { ref,provide } from 'vue';

const house = ref(100);

function editData(num:number){
  house.value -= num;
}

provide('send-house',{house,editData});



</script>
<style  scoped>
.parent-page{
  padding: 30px;
}
</style>
